﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Retete.ViewModels
{
    public class StocViewModel
    {
        public int ID { get; set; }
        public string Nume { get; set; }
        public string Cod { get; set; }
        public string Categorie { get; set; }
        public string UnitateMasura { get; set; }

        [DisplayFormat(DataFormatString = "{0:0.00}")]
        public decimal Cantitate { get; set; }

        [DisplayFormat(DataFormatString = "{0:0.00}")]
        public decimal CantitateTeoretica { get; set; }

        [DisplayFormat(DataFormatString = "{0:0.00}")]
        public decimal PretCumparare { get; set; }

        [DisplayFormat(DataFormatString = "{0:0.00}")]
        public decimal Pret { get; set; }

        [DisplayFormat(DataFormatString = "{0:0.00}")]
        public decimal Valoare
        {
            get { return Pret * Cantitate; }
        }

        [DisplayFormat(DataFormatString = "{0:0.00}")]
        public decimal ValoareCumparare
        {
            get { return PretCumparare * Cantitate; }
        }
    }
}